//
//  FinishViewController.m
//  Picture
//
//  Created by 孙玉琢 on 16/11/21.
//  Copyright © 2016年 孙玉琢. All rights reserved.
//

#import "FinishViewController.h"

// 屏幕高度
#define HEIGHT [UIScreen mainScreen].bounds.size.height
// 屏幕宽度
#define WIDTH [UIScreen mainScreen].bounds.size.width

@interface FinishViewController ()

@end

@implementation FinishViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.view.backgroundColor = [UIColor whiteColor];
    
    UIView * backView = [[UIView alloc] initWithFrame:CGRectMake((WIDTH -  (1181 * (HEIGHT - 64 -  200)) / 1748) / 2 - 20, 20, (1181 * (HEIGHT - 64 - 200)) / 1748 + 40, HEIGHT - 64 - 50)];
    
    [self.view addSubview:backView];
    
    UIImageView *finishImageView = [[UIImageView alloc]initWithImage:self.finishImage];
    finishImageView.frame = CGRectMake(0, 0, (1181 * (HEIGHT - 200)) / 1748, HEIGHT - 50 - 64);
    [backView addSubview:finishImageView];
    // Do any additional setup after loading the view.
    
    
    UIButton * closeBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, HEIGHT - 60, 100, 40)];
    [closeBtn setTitle:@"关闭" forState:UIControlStateNormal];
    [closeBtn setTitleColor:[UIColor blueColor] forState:UIControlStateNormal];
    [closeBtn addTarget:self action:@selector(clickClose) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:closeBtn];
}

- (void)clickClose
{
    //返回前一页
    [self dismissViewControllerAnimated:YES completion:^{
        
    }];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
